using System.Drawing;
using GeoSketch2.Core;

namespace GeoSketch2.Archaeo
{
    /// <summary>
    /// A class that contains the static variables for the application
    /// </summary>
    public static class Vars
    {   
        /// <summary>
        /// A class that contains the variables for the setup
        /// </summary>
        public static class Setup
        {
            /// <summary>
            /// A class that contains the variables for the setup of GeoObjects
            /// </summary>
            public static class DrawableObjects
            {
                /// <summary>
                /// A class that contains the variables for the drawing of GeoPoint
                /// </summary>
                public static class Point2D
                {
                    /// <summary>
                    /// To draw or not the id of the point
                    /// </summary>
                    public static bool DrawId = false;

                    /// <summary>
                    /// The radius of the cross on the screen (pixels)
                    /// </summary>
                    public static float CrossRadius = 5f;

                    /// <summary>
                    /// The font of the id
                    /// </summary>
                    public static Font IdFont = new Font(FontFamily.GenericSansSerif, 12f);
                }

                /// <summary>
                /// The setup of the textinput object
                /// </summary>
                public static class InputText
                {
                    /// <summary>
                    /// The font of the text
                    /// </summary>
                    public static Font TextFont = new Font(FontFamily.GenericSansSerif, 12f);
                }

                /// <summary>
                /// A class that contains the variables for the drawing of benchmark
                /// </summary>
                public static class Benchmark
                {

                    /// <summary>
                    /// The radius of the cross on the screen (pixels)
                    /// </summary>
                    public static float CrossRadius = Point2D.CrossRadius;

                    /// <summary>
                    /// The font of the altitude
                    /// </summary>
                    public static Font AltitudeFont = new Font(FontFamily.GenericSansSerif, 12f);
                }
            }

            /// <summary>
            /// The setup for the forms
            /// </summary>
            public static class Forms
            {
                /// <summary>
                /// The setup of the drawing form
                /// </summary>
                public static class DrawingForm
                {
                    /// <summary>
                    /// The maximum number of layers to display in the menu
                    /// </summary>
                    public static int MaxLayersToDisplay = 15;

                    /// <summary>
                    /// The colors to display in the menu
                    /// </summary>
                    public static Color[] MenuColors = new Color[]{
                        Color.Black,
                        Color.Red,
                        Color.Blue,
                        Color.Green,
                        Color.Yellow,
                        Color.Orange,
                        Color.Violet,
                        Color.Cyan
                    };

                    /// <summary>
                    /// The image index for the excavation site in the treeview
                    /// </summary>
                    public static int TreeViewSiteImageIndex = 0;

                    /// <summary>
                    /// The image index for the excavation site in the treeview
                    /// </summary>
                    public static int TreeViewSquareImageIndex = 1;

                    /// <summary>
                    /// The image index for the excavation site in the treeview
                    /// </summary>
                    public static int TreeViewUnitImageIndex = 2;
                }

                /// <summary>
                /// The setup of the main form
                /// </summary>
                public static class MainForm
                {
                    /// <summary>
                    /// The active items of the main form
                    /// </summary>
                    public static ActiveMDIParentItems ActiveMenuItems = new ActiveMDIParentItems(true, true, false, false, false, false, false, false, false, false, false);
                }
            }

            /// <summary>
            /// The setup for the tools
            /// </summary>
            public static class Tools
            {
                /// <summary>
                /// The setup of the object info tool
                /// </summary>
                public static class TObjectInfos
                {
                    /// <summary>
                    /// The pen to highlight already commented objects
                    /// </summary>
                    public static Pen HighlightPen = new Pen(Color.Cyan, 3f);
                }

                /// <summary>
                /// The setup of the lines distances tool
                /// </summary>
                public static class TLineDistances
                {
                    /// <summary>
                    /// The pen of the construction lines
                    /// </summary>
                    public static Pen ShiftedLinesPen = new Pen(Color.Red);
                }

                /// <summary>
                /// The setup of the circles intersection tool
                /// </summary>
                public static class TCirclesIntersection
                {
                    /// <summary>
                    /// The pen of the center of a circle
                    /// </summary>
                    public static Pen CircleCenterPen = new Pen(Color.Red);

                    /// <summary>
                    /// The pen of a circle
                    /// </summary>
                    public static Pen CirclePen = new Pen(Color.Red);
                }

                /// <summary>
                /// The setup of the free hand drawing tool
                /// </summary>
                public static class TFreeHand
                {
                    /// <summary>
                    /// The sampling rate of the tool, adds a point each time 
                    /// the mouse has moved more than the sampling rate in pixel
                    /// </summary>
                    public static int SamplingRate = 2;
                }
                
                /// <summary>
                /// The setup for the excavation squares creation tools
                /// </summary>
                public static class TExcavationSquareCreation
                {
                    /// <summary>
                    /// The color of the bounds of a square
                    /// </summary>
                    public static Color LineColor = Vars.Setup.StandardObjects.ExcavationAreas.ExcavationSite.ExcavationSquaresDisplayPen.Color;

                    /// <summary>
                    /// The line type of the bounds of a square
                    /// </summary>
                    public static LineType LineType = new LineType(LineStyle.Solid, 1f, 1f);
                }

                /// <summary>
                /// The setup for the excavation units creation
                /// </summary>
                public static class TExcavationUnitCreation
                {
                    /// <summary>
                    /// The color of the bounds of a unit
                    /// </summary>
                    public static Color LineColor = Vars.Setup.StandardObjects.ExcavationAreas.ExcavationSquare.ExcavationUnitsDisplayPen.Color;

                    /// <summary>
                    /// The line type of the bounds of a square
                    /// </summary>
                    public static LineType LineType = new LineType(LineStyle.Solid, 1f, 1f);
                }
            }

            /// <summary>
            /// The setup of standard object (primitives)
            /// </summary>
            public static class StandardObjects
            {
                /// <summary>
                /// The setup of the viewport object
                /// </summary>
                public static class Viewport
                {
                    /// <summary>
                    /// The image index for the excavation site in the treeview
                    /// </summary>
                    public static Color BackgroundColor = Color.White;

                    /// <summary>
                    /// The image index for the excavation site in the treeview
                    /// </summary>
                    public static Color ComplementRegionColor = Color.Silver;
                }

                /// <summary>
                /// The setup for the excavation areas
                /// </summary>
                public static class ExcavationAreas
                {
                    /// <summary>
                    /// The setup for the excavation site
                    /// </summary>
                    public static class ExcavationSite
                    {
                        /// <summary>
                        /// The pen used to display the bounds of the squares in the site view
                        /// </summary>
                        public static Pen ExcavationSquaresDisplayPen = new Pen(ExcavationSquare.DefaultLayerColor);

                        /// <summary>
                        /// The font used to display the bounds of the squares in the site view
                        /// </summary>
                        public static Font NameFontdisplay = new Font(FontFamily.GenericSansSerif, 12f);

                    }

                    /// <summary>
                    /// The setup for the excavation squares
                    /// </summary>
                    public static class ExcavationSquare
                    {
                        /// <summary>
                        /// The pen used to display the bounds of the units in the site view
                        /// </summary>
                        public static Pen ExcavationUnitsDisplayPen = new Pen(ExcavationUnit.DefaultLayerColor);

                        /// <summary>
                        /// The font used to display the bounds of the units in the site view
                        /// </summary>
                        public static Font NameFontdisplay = new Font(FontFamily.GenericSansSerif, 12f);

                        /// <summary>
                        /// The color of the default layer when an excavation square is created
                        /// </summary>
                        public static Color DefaultLayerColor = Color.Red;
                    }

                    /// <summary>
                    /// The setup for the excavation units
                    /// </summary>
                    public static class ExcavationUnit
                    {
                        /// <summary>
                        /// The color of the default layer when an excavation unit is created
                        /// </summary>
                        public static Color DefaultLayerColor = Color.Blue;
                    }

                    /// <summary>
                    /// The default linetype for each of the new excavation area created
                    /// </summary>
                    public static LineType DefaultLineType = new LineType(LineStyle.Solid);
                }
            }

            /// <summary>
            /// The setup of the toolbars
            /// </summary>
            public static class Toolbars
            {
                
            }

            public static class FileIO
            {
                public static class DXFR13
                {
                    public static double DefaultTextHeight = 20;
                }

                public static class GSK
                {
                    public const string OpenSaveDialogDefaultExtensionFilter = "Geosketch files (*.gsk)|*.gsk|All files (*.*)|*.*";
                }
            }
        }
    }
}
